/**
 * 湖南江河机电自动化设备股份有限公司 版权所有
 * Copyright @2016-2020 All Rights Reserved
 */
package com.hnjme.cnec.mdm.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import reactor.core.Environment;
import reactor.core.Reactor;
import reactor.core.spec.Reactors;
import reactor.spring.context.config.EnableReactor;

/**
 * @author outta
 * @Since 1.0 2018/8/29
 */
@Configuration
@EnableReactor
public class SyncConfig {

    @Bean
    Environment env() {
        return new Environment();
    }

    /**
     *
     */
    @Bean(name = "processor")
    public Reactor masterDataProcessor(Environment env) {
        return Reactors.reactor().env(env).dispatcher(Environment.THREAD_POOL).get();
    }
}
